<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2023-05-26
  Time: 16:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%!
    private static SimpleDateFormat df=new SimpleDateFormat("yyyy.MM.dd HH时mm分ss秒");
    public String toStr(Date d){
        return df.format(d);
    }
%>
 <h1>
     <%
         Date d=new Date();
         String str=toStr(d);
     %>
     <%=str%>
 </h1>
</body>
</html>
